package com.vcredit.creditcat.model;

import java.text.ParseException;
import java.util.Calendar;

import org.apache.commons.lang.StringUtils;

import com.vcredit.creditcat.util.ConcurrentDateUtil;

/**
 * 用户补充项完成信息表
 **/
public class CustSupplementItem {
	private static final long serialVersionUID = -1L;
    /** 记录id **/
    private java.lang.Long id;
    /** 用户id **/
    private java.lang.Long custId;
    /** proccess_id **/
    private java.lang.Long proccessId;
    /** 补充认证项id **/
    private java.lang.Long supplementItemId;
    /** 完成状态  0：未认证  1：认证成功  2：认证中  3：认证失败 **/
    private java.lang.Integer status;
    /** 完成时间 **/
    private java.lang.String doneTime;
    /** 认证数据 json串 **/
    private java.lang.String dataEntity;
    /** 失败原因 **/
    private java.lang.String failReason;
    /** 创建时间 **/
    private java.util.Date createTime;
    /** 更新时间 **/
    private java.util.Date updateTime;
    /** 认证项失效时间 **/
    private java.lang.String expireTime;
    public java.lang.Long getId(){
        return id;
    }
    public void setId(java.lang.Long id){
        this.id = id;
    }
    public java.lang.Long getCustId(){
        return custId;
    }
    public void setCustId(java.lang.Long custId){
        this.custId = custId;
    }
    public java.lang.Long getProccessId(){
        return proccessId;
    }
    public void setProccessId(java.lang.Long proccessId){
        this.proccessId = proccessId;
    }
    public java.lang.Long getSupplementItemId(){
        return supplementItemId;
    }
    public void setSupplementItemId(java.lang.Long supplementItemId){
        this.supplementItemId = supplementItemId;
    }
    public java.lang.Integer getStatus(){
        return status;
    }
    public void setStatus(java.lang.Integer status){
        this.status = status;
    }
    public java.lang.String getDoneTime(){
        return doneTime;
    }
    public void setDoneTime(java.lang.String doneTime){
        this.doneTime = doneTime;
    }
    public java.lang.String getDataEntity(){
        return dataEntity;
    }
    public void setDataEntity(java.lang.String dataEntity){
        this.dataEntity = dataEntity;
    }
    public java.lang.String getFailReason(){
        return failReason;
    }
    public void setFailReason(java.lang.String failReason){
        this.failReason = failReason;
    }
    public java.util.Date getCreateTime(){
        return createTime;
    }
    public void setCreateTime(java.util.Date createTime){
        this.createTime = createTime;
    }
    public java.util.Date getUpdateTime(){
        return updateTime;
    }
    public void setUpdateTime(java.util.Date updateTime){
        this.updateTime = updateTime;
    }
    public java.lang.String getExpireTime(){
        return expireTime;
    }
    public void setExpireTime(java.lang.String expireTime){
        this.expireTime = expireTime;
    }
    
    public boolean computeExpire() throws ParseException{
		if(StringUtils.isEmpty(this.expireTime)){
			return false;
		}
		Calendar cal = Calendar.getInstance();
		long now = cal.getTimeInMillis();
		long expire = ConcurrentDateUtil.strToDate(this.expireTime).getTime();
		if(expire<now){
			return true;
		}
		return false;
	}
}